﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PACKETPARSERMAX20.CORE
{

    public enum QuestFailedReasons : uint
    {
        INVALIDREASON_DONT_HAVE_REQ = 0,
        INVALIDREASON_QUEST_FAILED_LOW_LEVEL = 1,        //You are not high enough level for that quest.
        INVALIDREASON_QUEST_FAILED_WRONG_RACE = 6,        //That quest is not available to your race.
        INVALIDREASON_QUEST_ALREADY_DONE = 7,        //You have completed that quest.
        INVALIDREASON_QUEST_ONLY_ONE_TIMED = 12,       //You can only be on one timed quest at a time.
        INVALIDREASON_QUEST_ALREADY_ON = 13,       //You are already on that quest
        INVALIDREASON_QUEST_FAILED_EXPANSION = 16,       //This quest requires an expansion enabled account.
        INVALIDREASON_QUEST_ALREADY_ON2 = 18,       //You are already on that quest
        INVALIDREASON_QUEST_FAILED_MISSING_ITEMS = 21,       //You don't have the required items with you. Check storage.
        INVALIDREASON_QUEST_FAILED_NOT_ENOUGH_MONEY = 23,       //You don't have enough money for that quest.
        INVALIDREASON_DAILY_QUESTS_REMAINING = 26,       //You have already completed 10 daily quests today
        INVALIDREASON_QUEST_FAILED_CAIS = 27,       //You cannot complete quests once you have reached tired time
    };

    public enum QuestShareMessages : uint
    {
        QUEST_PARTY_MSG_SHARING_QUEST = 0,
        QUEST_PARTY_MSG_CANT_TAKE_QUEST = 1,
        QUEST_PARTY_MSG_ACCEPT_QUEST = 2,
        QUEST_PARTY_MSG_REFUSE_QUEST = 3,
        QUEST_PARTY_MSG_TOO_FAR = 4,
        QUEST_PARTY_MSG_BUSY = 5,
        QUEST_PARTY_MSG_LOG_FULL = 6,
        QUEST_PARTY_MSG_HAVE_QUEST = 7,
        QUEST_PARTY_MSG_FINISH_QUEST = 8,
    };

    public enum __QuestTradeSkill : uint
    {
        QUEST_TRSKILL_NONE = 0,
        QUEST_TRSKILL_ALCHEMY = 1,
        QUEST_TRSKILL_BLACKSMITHING = 2,
        QUEST_TRSKILL_COOKING = 3,
        QUEST_TRSKILL_ENCHANTING = 4,
        QUEST_TRSKILL_ENGINEERING = 5,
        QUEST_TRSKILL_FIRSTAID = 6,
        QUEST_TRSKILL_HERBALISM = 7,
        QUEST_TRSKILL_LEATHERWORKING = 8,
        QUEST_TRSKILL_POISONS = 9,
        QUEST_TRSKILL_TAILORING = 10,
        QUEST_TRSKILL_MINING = 11,
        QUEST_TRSKILL_FISHING = 12,
        QUEST_TRSKILL_SKINNING = 13,
        QUEST_TRSKILL_JEWELCRAFTING = 14,
    };

    public enum QuestStatus : uint
    {
        QUEST_STATUS_NONE = 0,
        QUEST_STATUS_COMPLETE = 1,
        QUEST_STATUS_UNAVAILABLE = 2,
        QUEST_STATUS_INCOMPLETE = 3,
        QUEST_STATUS_AVAILABLE = 4,
        MAX_QUEST_STATUS
    };

    public enum __QuestGiverStatus : uint
    {
        DIALOG_STATUS_NONE = 0,
        DIALOG_STATUS_UNAVAILABLE = 1,
        DIALOG_STATUS_CHAT = 2,
        DIALOG_STATUS_INCOMPLETE = 3,
        DIALOG_STATUS_REWARD_REP = 4,
        DIALOG_STATUS_AVAILABLE_REP = 5,
        DIALOG_STATUS_AVAILABLE = 6,
        DIALOG_STATUS_REWARD2 = 7,             // not yellow dot on minimap
        DIALOG_STATUS_REWARD = 8              // yellow dot on minimap
    };

    public enum __QuestFlags : uint
    {
        // Flags used at server and sent to client
        QUEST_FLAGS_STAY_ALIVE = 0x00000001,                // Not used currently
        QUEST_FLAGS_PARTY_ACCEPT = 0x00000002,                // Not used currently. If player in party, all players that can accept this quest will receive confirmation box to accept quest CMSG_QUEST_CONFIRM_ACCEPT/SMSG_QUEST_CONFIRM_ACCEPT
        QUEST_FLAGS_EXPLORATION = 0x00000004,                // Not used currently
        QUEST_FLAGS_SHARABLE = 0x00000008,                // Can be shared: Player::CanShareQuest()
        //QUEST_FLAGS_NONE2        = 0x00000010,                // Not used currently
        QUEST_FLAGS_EPIC = 0x00000020,                // Not used currently: Unsure of content
        QUEST_FLAGS_RAID = 0x00000040,                // Not used currently
        QUEST_FLAGS_TBC = 0x00000080,                // Not used currently: Available if TBC expansion enabled only
        QUEST_FLAGS_UNK2 = 0x00000100,                // Not used currently: _DELIVER_MORE Quest needs more than normal _q-item_ drops from mobs
        QUEST_FLAGS_HIDDEN_REWARDS = 0x00000200,                // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUESTGIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE))
        QUEST_FLAGS_AUTO_REWARDED = 0x00000400,                // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
        QUEST_FLAGS_TBC_RACES = 0x00000800,                // Not used currently: Blood elf/Draenei starting zone quests
        QUEST_FLAGS_DAILY = 0x00001000,                // Used to know quest is Daily one

        // Mangos flags for set SpecialFlags in DB if required but used only at server
        QUEST_MANGOS_FLAGS_REPEATABLE = 0x010000,     // Set by 1 in SpecialFlags from DB
        QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT = 0x020000,     // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script DLL)
        QUEST_MANGOS_FLAGS_DB_ALLOWED = 0xFFFF | QUEST_MANGOS_FLAGS_REPEATABLE | QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT,

        // Mangos flags for internal use only
        QUEST_MANGOS_FLAGS_DELIVER = 0x040000,     // Internal flag computed only
        QUEST_MANGOS_FLAGS_SPEAKTO = 0x080000,     // Internal flag computed only
        QUEST_MANGOS_FLAGS_KILL_OR_CAST = 0x100000,     // Internal flag computed only
        QUEST_MANGOS_FLAGS_TIMED = 0x200000,     // Internal flag computed only
    };

    public enum QuestUpdateState : uint
    {
        QUEST_UNCHANGED = 0,
        QUEST_CHANGED = 1,
        QUEST_NEW = 2
    };


}
